package demo.handler;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import org.springframework.web.servlet.NoHandlerFoundException;

import javax.servlet.http.HttpServletRequest;

/**
 * @author wyb.
 */
@RestControllerAdvice
public class HttpErrorHandler {

	@ExceptionHandler({
			NoHandlerFoundException.class,
	})
	public Object handle404Error(Exception e, HttpServletRequest request) {

		return "404 NOT FOUND";
	}

}
